package main

import (
	"GoGin/controller"
	"GoGin/middleware"

	"github.com/gin-gonic/gin"
)

func routes(r *gin.Engine) *gin.Engine {
	r.POST("/register", controller.Register)
	r.POST("/login", controller.Login)
	r.GET("/info", middleware.AuthMiddleware(), controller.Info) // 如果这里面没有加入中间件middleware.AuthMiddleware()
	return r
}
